<?php
session_start();

include((dirname(dirname(dirname(__FILE__))))."/functions/inc/mydb.inc.php");
include((dirname(dirname(dirname(__FILE__))))."/functions/inc/seguridad.php");
if(isset($_GET["tip"]) && is_numeric($_GET["tip"])){
$db= new mydb();

$cuotas=$db->consulta("SELECT MAX( cuota_fin ) as maximo , MIN( cuota_inicio ) as minimo  FROM cuota WHERE forma_id=".$_GET["tip"]." ");
$inicio=$cuotas[0]["minimo"];
$fin=$cuotas[0]["maximo"];
echo "<label>Cantidad de cuotas</label>";
echo "<select  name='cuotas' id='cuotas' >";
for($i=$inicio;$i<=$fin;$i++)
echo "<option  value='$i' >$i</option>";
echo "</select>";
}
?>
